package org.example.designpattern.state;

import lombok.Data;

@Data
public class LightContext {

    private final LightOnState onState = new LightOnState();
    private final LightOffState offState = new LightOffState();


    private LightState state;

    public LightContext(LightState state) {
        this.state = state;
    }

    public void on(){
        state.on(this);
    }

    public void off(){
        state.off(this);
    }



}
